package org.example.infrastructure.persistence.orm;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.domain.model.entity.url.UrlShortenerNetworkStats;
import org.example.domain.model.entity.url.req.UrlShortenerGroupStatsReq;
import org.example.domain.model.entity.url.req.UrlShortenerStatsReq;

import java.util.List;

@Mapper
public interface UrlShortenerNetworkStatsMapper extends BaseMapper<UrlShortenerNetworkStats> {
    void insertUrlShortenerNetworkStats(UrlShortenerNetworkStats urlShortenerNetworkStats);

    /** 根据短链接获取指定日期内访问网络监控数据 */
    List<UrlShortenerNetworkStats> networkStatsByUrlShortenerList(@Param(value = "param") UrlShortenerStatsReq urlShortenerStatsReq);

    /** 根据分组获取指定日期内访问网络监控数据 */
    List<UrlShortenerNetworkStats> networkStatsByGroupList(@Param(value = "param")UrlShortenerGroupStatsReq urlShortenerGroupStatsReq);
}
